package com.system.outpatientsystem.service.impl;

import com.system.outpatientsystem.mapper.DoctorMapper;
import com.system.outpatientsystem.pojo.Category;
import com.system.outpatientsystem.pojo.Doctor;
import com.system.outpatientsystem.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorMapper doctorMapper;


    @Override
    public List<Category> getCategory() {
        return doctorMapper.getCategory();
    }

    @Override
    public List<Doctor> getDoctorsByOffice(String office) {
        return doctorMapper.getDoctorsByOffice(office);
    }

    @Override
    public Doctor findByPhone(String phone) {
        return  doctorMapper.findByPhone(phone);
    }
}
